package com.sservice.model.dao;

import com.sservice.model.entity.PurchaseOrder;
import com.sservice.model.vo.PurchaseOrderVo;

import java.util.List;

public interface PurchaseOrderMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(PurchaseOrder record);

    int insertSelective(PurchaseOrder record);

    PurchaseOrder selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(PurchaseOrder record);

    int updateByPrimaryKey(PurchaseOrder record);

    /**
     * 统计某一采购单的订单量
     *
     * @param record 采购单-purchaseId表示
     * @return
     */
    int countByPurchaseId(PurchaseOrder record);

    int queryByCount(PurchaseOrderVo record);

    List<PurchaseOrderVo> queryByPage(PurchaseOrderVo record);

    /**
     * 当月定单数
     *
     * @return
     */
    int queryCurrentMonthCount();
}